﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class GlobalSettings : MonoBehaviour
{
    public static GlobalSettings Instance;//单例模式
    public bool isStarted = false;//是否开始游戏
    public bool k1Pressed = false; //按钮是否按下
    public bool k2Pressed = false;
    public bool k3Pressed = false;
    public bool k4Pressed = false;
    public bool k1InZone = false; //note是否进入判定区
    public bool k2InZone = false;
    public bool k3InZone = false;
    public bool k4InZone = false;
    public bool isPaused = false;//是否暂停
    public bool sheetEnd = false;//谱面是否读到最后一行的end
#if UNITY_ANDROID || UNITY_EDITOR
    public bool k1Holding = false;//是否长按k1
    public bool k2Holding = false;//是否长按k2
    public bool k3Holding = false;//是否长按k3
    public bool k4Holding = false;//是否长按k4
#endif
    public string[] notes;//读取到的谱面文件内容
    public string songName;//要被游玩的谱面文件名
    public string scoreLevel;//PM FR TC
    public float startTime; //记录开始游戏的时间 用于谱面note加载时机计算
    public float streamMultiply = 5f; //note流速
    public float offset = -0.2f; //延迟
    public float lifeTime = 0.15f; //pure far lost判定提示效果的显示时间 
    public float topPosY; //top按钮的y坐标 用于确定note生成位置的y坐标
    public float standardWidth = 1062;//设计分辨率
    public float standardHeight = 392;//设计分辨率
    public float pureScore;//pure分值
    public float farScore;//far分值
    public float score;//float类型的精确总分
    public float multiNoteOffset = 0.26f;//用于多押调整错位的偏移量
    public int combo=0;//连击数
    public int noteSum=0;//谱面总物量
    public int pureNum = 0;//当前pure数
    public int farNum = 0;//当前far数
    public int lostNum = 0;//当前lost数
    public Vector3 k1Pos, k2Pos, k3Pos, k4Pos; //四个键位的坐标 用于确定note生成位置
    public KeyCode key1 = KeyCode.D;
    public KeyCode key2 = KeyCode.F;
    public KeyCode key3 = KeyCode.J;
    public KeyCode key4 = KeyCode.K;
    private void Awake()
    {
        if (Instance == null)
        {
            DontDestroyOnLoad(gameObject);
            Instance = this;
        }
        else if (Instance != null)
        {
            Destroy(gameObject);
        }
    }
    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        
    }
}
